home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 January / Disc 3 / Amethyst.iso / live / usr / lib / rpm-3.0.6 / check-prereqs < prev    next >
Encoding:
Text File  |  2001-04-06  |  422 b   |  18 lines

  1. #!/bin/bash2
  2.  
  3. bashit="/bin/bash2 --rpm-requires"
  4.  
  5. # Make sure that this bash has the rpm-requires hack
  6. $bashit < /dev/null 2>&1 > /dev/null || exit $?
  7.  
  8. prereqs="`cat | $bashit | sort | uniq | sed -e 's/^bash(//' -e 's/)$//'`" -e 's/^executable(//' -e 's/)$//'`"
  9. [ -z "$prereqs" ] && exit 0
  10.  
  11. for prereq in $prereqs
  12. do
  13.     case $prereq in
  14.     /*)    echo $prereq ;;
  15.     *)    echo "`which $prereq`" ;;
  16.     esac
  17. done | sort | uniq
  18.